package com.ruoyi.web.core.config;

import com.ruoyi.school.service.ILoveService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.io.IOException;

@Component
public class FileDeleteScheduler {

    @Autowired
    private ILoveService loveService;

    @Scheduled(cron = "0 0 0 L * * ")
//    每个月最后一天执行零点执行
    public void deleteFile() throws IOException {
        loveService.pressImag();

    }
}